fix: pin axios exactly so consumers cannot resolve an uncached release - #263
Closed
ChenMachBase wants to merge 1 commit into
Closed
fix: pin axios exactly so consumers cannot resolve an uncached release#263ChenMachBase wants to merge 1 commit into
ChenMachBase wants to merge 1 commit into
Conversation
A library's lockfile does not constrain its consumers. Deno and Cloudflare Workers resolve `npm:@base44/sdk@x.y.z` against this package.json's range, not against package-lock.json — so `^1.18.1` meant every function redeploy picked whatever 1.x npm had published most recently, even though the lockfile here has always said 1.18.1. That took down generated backend functions today: axios 1.20.0 shipped, redeploys started resolving it, and the Deno runtime runs `--cached-only` against a cache warmed with 1.18.1 — so any edited function 502'd on cold start while untouched warm functions kept serving. It is also a supply-chain gap. `minimumReleaseAge` gives this repo a 7-day cooldown on new releases, but that applies at *our* install time; a consumer resolving a caret at deploy time gets a package published minutes ago with no cooldown at all. The resolved version is unchanged (1.18.1, exactly what the lockfile already pinned), so this is inert for anything installing from the lockfile and only changes what a `npm:` consumer resolves. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/sdk@0.8.44-pr.263.808bbc2Prefer not to change any import paths? Install using npm alias so your code still imports npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.44-pr.263.808bbc2"Or add it to your {
"dependencies": {
"@base44/sdk": "npm:@base44-preview/sdk@0.8.44-pr.263.808bbc2"
}
}
Preview published to npm registry — try new features instantly! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
axios: "^1.18.1"→axios: "1.18.1". The resolved version does not change — the lockfile has always said1.18.1.A library's lockfile does not constrain its consumers. Deno and Cloudflare Workers resolve
npm:@base44/sdk@x.y.zagainst thispackage.json's range, so the caret meant every generated-function redeploy picked whatever1.xnpm had published most recently.The outage this caused
axios
1.20.0shipped. Redeploys began resolving it, and the Deno runtime runs--cached-onlyagainst a cache warmed with1.18.1, so any edited function 502'd on cold start while untouched warm functions kept serving. Two automations auto-paused after consecutive failures (recoverStuckProcessingOrders,createAbandonmentCoupon). The reported error is exactly this:npm package not found in cache: "axios", --cached-only is specified.Supply-chain angle
This repo's
minimumReleaseAgegives a 7-day cooldown, but that applies at our install time. A consumer resolving a caret at deploy time gets a package published minutes ago with no cooldown at all — the hazard apper'sCLAUDE.mdcalls out fornpm:specifiers.Scope
npm civerified consistent, resolved version identical).npm:consumer resolves — which is the point.236 tests pass, typecheck and eslint clean.Does NOT fix the live incident
Functions already generated pin
@base44/sdk@0.8.40, whose publishedpackage.jsonstill carries the caret and is immutable. The Deno npm cache still needsaxios@1.20.0warmed to recover those. This closes the hole for functions generated after the next release.